import { createRouter, createWebHistory } from "vue-router";
// import Home from "../views/Home-fullpage.vue";

const routes = [
  // {
  //   path: "/",
  //   name: "Home",
  //   component: Home,
  // },
];
// 路由配置
const asyncRoutes = [
  {
    path: "/",
    name: "Home",
    component: () => import("@/views/Home.vue"),
    meta: { title: "首页", isShow: true },
  },
  {
    path: "/home1",
    name: "Home1",
    component: () => import("@/views/Home-fullpage.vue"),
    meta: { title: "首页", isShow: false },
  },
  {
    path: "/about",
    name: "About",
    component: () => import("@/views/About.vue"),
    meta: { title: "关于", isShow: true },
  },
  {
    path: "/achievement",
    name: "achievement",
    component: () => import("@/views/achievement.vue"),
    meta: { title: "成果展示", isShow: true },
  },
  {
    path: "/cooperate",
    name: "cooperate",
    component: () => import("@/views/cooperate.vue"),
    meta: { title: "战略合作", isShow: true },
  },
  {
    path: "/eventActivities",
    name: "eventActivities",
    component: () => import("@/views/eventActivities.vue"),
    meta: { title: "赛事活动", isShow: true },
  },
  {
    path: "/franchisePolicy",
    name: "franchisePolicy",
    component: () => import("@/views/franchisePolicy.vue"),
    meta: { title: "加盟政策", isShow: true },
  },
  {
    path: "/contact",
    name: "contact",
    component: () => import("@/views/contact.vue"),
    meta: { title: "联系我们", isShow: true },
  },

];
const base = import.meta.env.BASE_URL;

const router = createRouter({
  history: createWebHistory(base),
  routes: [...routes, ...asyncRoutes],
});

export default router;
